package com.shuda.business.channel.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shuda.business.channel.entity.DistributionRuleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 分发规则Mapper接口
 */
@Mapper
public interface DistributionRuleMapper extends BaseMapper<DistributionRuleEntity> {

    /**
     * 根据方案ID删除规则
     */
    void deleteBySchemeId(@Param("schemeId") Long schemeId);

    /**
     * 根据方案ID获取规则列表
     */
    List<String> getRulesBySchemeId(@Param("schemeId") Long schemeId);

    /**
     * 批量插入规则
     */
    void insertRules(@Param("schemeId") Long schemeId, @Param("rules") List<DistributionRuleEntity> rules);
}